import request from "@/utils/request";

export default {
  //查询所有章节小节
  getAllChapter(courseid) {
    return request({
      url: `/eduservice/educhapter/${courseid}`,
      method: "get"
    });
  },
  //添加章节
  saveChapter(chaptervo) {
    return request({
      url: `/eduservice/educhapter/save`,
      method: "post",
      data: chaptervo
    });
  },
  //根据编号查询章节
  byidChapter(id) {
    return request({
      url: `/eduservice/educhapter/byid/${id}`,
      method: "get"
    });
  },
  //修改章节
  updateByChapter(chaptevo) {
    return request({
      url: `/eduservice/educhapter/edit`,
      method: "post",
      data: chaptevo
    });
  },
  //删除章节 不许得先删除小节才能删除章节
  delChapterByid(id) {
    return request({
      url: `/eduservice/educhapter/del/${id}`,
      method: "delete"
    });
  }
};
